package da.asclass.events.cl
{
    import da.asclass.util.Constant;
    import da.asclass.util.Util;

    import flash.events.Event;
    import mx.utils.StringUtil;
    import mx.controls.Alert;

    public class CreateEvent extends Event
    {
        public static const type:String = "CREATE_EVENT";
        private var _userName:String = null;
        private var _pass:String = null;
        private var cmd:String = Constant.CMD_CREATE;

        public function CreateEvent ()
        {
            super( CreateEvent.type );
        }

        public function get userName ():String
        {
            return this._userName;
        }

        public function set userName ( userName:String ):void
        {
            this._userName = userName;
        }

        public function get pass ():String
        {
            return this._pass;
        }

        public function set pass ( pass:String ):void
        {
            this._pass = pass;
        }

        public function getMessage ():String
        {
            var fromUserID:String = Util.getUserID( Constant.USER_ID );
            var toUserID:String = Util.getUserID( Constant.SERVER_ID );
            var message:String = cmd + fromUserID + toUserID;
            return message;
        }

    }
}